home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 2 / MacMania 2.toast / Demo's / Tools&Utilities / Updaters / Symantec C++⁄MPW 6.0.1 / SCpp 6.0.1 Update / SCLibraries / SCSrcLibCpp / iossti.cpp next >
Encoding:
Text File  |  1993-08-12  |  1.3 KB  |  58 lines  |  [TEXT/KAHL]

  1. // STATICS.CPP
  2. //
  3. // Written by Steve Teale, April 1991
  4. // Copyright (c) 1993 Symantec Corporation
  5. //
  6. // This translation unit contains the code to initialize the
  7. // standard stream classes, and to set up appropriate ties
  8. // and defaults.
  9. //
  10. // In the case of compilers generating native code there is no
  11. // need for complicated provisions to ensure that static objects
  12. // with constructors get initialized before they are used.
  13. //
  14. // Library objects are initialized before user objects, The
  15. // stream classes are currently the only such objects in the
  16. // libraries.
  17.  
  18. #include <fstream.hpp>
  19.  
  20. filebuf __fd0(0, ios::in
  21. #if M_UNIX_ || M_XENIX
  22.                 );
  23. #else
  24.                 | ios::translated);
  25. #endif
  26. istream_withassign cin(&__fd0);
  27.  
  28. filebuf __fd1(1, ios::out
  29. #if M_UNIX || M_XENIX || macintosh
  30.                 );
  31. #else
  32.                 | ios::translated);
  33. #endif
  34. ostream_withassign cout(&__fd1);
  35.  
  36.  
  37. filebuf __fd2(2,0,0, ios::out
  38. #if !(M_UNIX || M_XENIX || macintosh)
  39.                 | ios::translated);
  40. #else
  41.                 );
  42. #endif
  43. ostream_withassign cerr(&__fd2);
  44.  
  45. #if M_UNIX || M_XENIX
  46. filebuf __fd3(3, ios::out);
  47. ostream_withassign clog(&__fd3);
  48. #else
  49. filebuf __fd3(3,0,0,ios::out | ios::translated);
  50. ostream_withassign caux(&__fd3);
  51. #endif
  52.  
  53.  
  54. filebuf __fd4(4,0,0,ios::out | ios::translated);
  55. ostream_withassign cprn(&__fd4);
  56.  
  57. static IosTie _(&cin,&cout);
  58.